<?php
namespace App\Transformers;

use League\Fractal\TransformerAbstract;
use App\Model\Position;

class PositionTransformer extends TransformerAbstract{

    public function transform(Position $item){
        return [
            'id' => $item->id,
            'bistro_id' => $item->bistro_id,
            'name' => $item->name,
            'qr_code' => $item->qr_code,
            'servant_count' => $item->servant_count,
            'created_at' =>$item->created_at->toDateTimeString(),
            'updated_at' =>$item->updated_at->toDateTimeString()
        ];
    }
}